import { translateTitle } from '@/utils/i18n'
const MessageStructure = {
  MessageStructure: {
    search: {
      form: {
        method: 'ApimMessageStructureQuery',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'MESSAGE_GROUP_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.消息集编号'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'MESSAGE_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.接口编号'),
            labelHidden: false,
          },
          {
            type: 'button',
            label: translateTitle('Dams.APIMinterfaceManagement.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        method: '',
        name: 'dialog',
        field: [
          {
            type: 'checkbox',
            name: 'ID',
            label: '',
            hidden: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_GROUP_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.消息集编号'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.接口编号'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_TYPE',
            label: translateTitle('Dams.APIMinterfaceManagement.消息结构'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'select',
            name: 'ACTIVE_FLAG',
            label: translateTitle('Dams.APIMinterfaceManagement.激活标志'),
            labelHidden: false,
            isRules: true,
            options: [
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'input',
            name: 'XPATH_EXPRESS',
            label: translateTitle('Dams.APIMinterfaceManagement.节点解析表达式'),
            labelHidden: false,
          },
          {
            type: 'select',
            name: 'ADAPTER_TYPE',
            label: translateTitle('Dams.APIMinterfaceManagement.所属方向'),
            labelHidden: false,
            options: [
              {
                LABEL: '入向',
                CODE: 'I',
              },
              {
                LABEL: '出向',
                CODE: 'O',
              },
            ],
          },
          {
            type: 'input',
            name: 'PARENT_ELEMENT',
            label: translateTitle('Dams.APIMinterfaceManagement.父级节点名称'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'DATA_SQL',
            label: translateTitle('Dams.APIMinterfaceManagement.消息提取SQL'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'ADD_TIME',
            label: translateTitle('Dams.APIMinterfaceManagement.创建时间'),
            hidden: true,
          },
          {
            type: 'input',
            name: 'ADD_WHO',
            label: translateTitle('Dams.APIMinterfaceManagement.创建人'),
            hidden: true,
          },
          {
            type: 'input',
            name: 'EDIT_TIME',
            label: translateTitle('Dams.APIMinterfaceManagement.编辑时间'),
            hidden: true,
          },
          {
            type: 'input',
            name: 'EDIT_WHO',
            label: translateTitle('Dams.APIMinterfaceManagement.编辑人'),
            hidden: true,
          },
          {
            type: 'button',
            label: translateTitle('Dams.APIMinterfaceManagement.提交'),
            labelHidden: true,
            isRules: true,
          },
        ],
      },
    },
    deleteMethod: 'ApimMessageStructureRemove',
    updateMethod: 'ApimMessageStructureUpdate',
    addMethod: 'ApimMessageStructureSava',
    downloadMethod: 'apim.message.structure.export',
  },
}
export default MessageStructure
